package com.sr.maven.dao.impl;

import com.sr.maven.dao.BaseDao;
import com.sr.maven.dao.api.EmpDao;
import com.sr.maven.entity.Emp;

public class EmpDaoImpl  extends BaseDao<Emp> implements EmpDao {
    @Override
    public Emp selectEmpByLoginAccount(String loginAccount, String loginPassword) {

        //1.编写sql语句
        String sql = "select emp_id empId,emp_name empName,emp_position empPosition,login_account loginAccount,login_password  loginPassword from t_emp where login_account=? and login_password=?";

        //2.调用父类方法查询单个对象
        return super.getSingleBean(sql, Emp.class, loginAccount,loginPassword);

    }
}
